package cn.puge.mertisfront.controller;


import cn.puge.commonutils.R;
import cn.puge.mertisfront.entity.PugeLike;
import cn.puge.mertisfront.service.PugeLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *点赞
 * @author LIJW
 * @since 2020-09-18
 */
@RestController
@RequestMapping("/mertisfront/puge-like")
@CrossOrigin
public class PugeLikeController {

    //注入点赞
    @Autowired
    private PugeLikeService pugeLikeService;

    /**
     * 进行点赞
     * @param pugeLike
     * @return
     */
    @PostMapping("addLike")
    public R addLike(@RequestBody PugeLike pugeLike){
        pugeLikeService.save(pugeLike);
        return R.ok();
    }


}

